#include<iostream>
using namespace std;
int t, m, a;
int main()
{
    cin >> t;
    while (t--)
    {
        cin >> m >> a;
        int max_b = m - a;
        if (max_b < a) printf("NO\n");
        else
        {
            int b = 0;
            for (int i = 1; i <= max_b; i++)
            {
                if (i - a > a) b++;
            }
            if (b * 2 > max_b) printf("YES\n");
            else printf("NO\n");
        }
    }
    return 0;
}